function uploadVideo() {
  var me = this;
  wx.chooseVideo({
    sourceType: ['album', 'camera'],
    success(res) {
      //console.log(res);
      var duration = res.duration;
      var height = res.height;
      var width = res.width;
      var size = res.size;
      var tempVideoUrl = res.tempFilePath;
      var tempCoverUrl = res.thumbTempFilePath;
      if (duration > 16) {
        wx.showToast({
          title: '视频时长不能超过15秒哦...',
          icon: 'none',
          duration: 2500
        })
      } else if (duration < 2) {
        wx.showToast({
          title: '视频时长不能少于2秒哦...',
          icon: 'none',
          duration: 2500
        })
      } else {
        //TODO 跳转到选择bgm的页面
        wx.navigateTo({
          url: '../chooseBgm/chooseBgm?duration=' + duration +
            "&height=" + height +
            "&width=" + width +
            "&size=" + size +
            "&tempVideoUrl=" + tempVideoUrl +
            "&tempCoverUrl=" + tempCoverUrl,
        })

      }
    }
  })
}
//导出此js
module.exports = {
  uploadVideo: uploadVideo
}
